__author__ = 'Morgen Matvey, Smolnikov Rodion'

from urllib.request import Request

HH_AUTH_URI = 'https://m.hh.ru/oauth/authorize'

CLIENT_ID = 'IDKM8RE7BG5Q638TAOSR8Q8CUS4QA1I8NJ1BT56MV823ORFEPJRHGKJVE4OOS31B'
CLIENT_SECRET = 'GE99NOPCIODON0ML6BPUL3NHR68OUDMIPC0H3V6V81FNU40KHESR225DISFUT0MT'
CALLBACK_URI = 'http://hhcourse.ilab.mipt.ru/auth/hhrudone'


def generate_redirect_uri():
    return "{hh_auth_uri}?" \
           "response_type=code&client_id={client_id}&state={state}&redirect_uri={redirect_uri}"\
        .format(hh_auth_uri=HH_AUTH_URI, client_id=CLIENT_ID, state="def", redirect_uri=CALLBACK_URI)


    #request = Request(HH_AUTH_URI)

def get_user_access_token(request):
    return 'FIXME'